from openpyxl import load_workbook
# 读取excel文件
workbook = load_workbook("/home/thseus/workspaces/python/外国硬币汇总.xlsx")

def readZJ(workbook, sheetName):
    sheet = workbook[sheetName]
    query = '''insert into tp_enumvalue(s_typecode,s_value,s_typename,s_valuecmt,s_remark)
    VALUES (%s,%s,%s,%s,%s)'''
    for i in range(2, sheet.max_row + 1):
        s_typecode = str(sheet.cell(i, 1).value)
        s_value = str(sheet.cell(i, 2).value)
        s_typename = str(sheet.cell(i, 3).value)
        s_remark = str(sheet.cell(i, 4).value)
        s_valuecmt = str(sheet.cell(i, 5).value)
        values = (s_typecode, s_value, s_typename, s_valuecmt, s_remark)

readZJ(workbook, 'sheet1')